package com.google.gwt.it2tool.client;

import java.io.Serializable;
import java.util.HashMap;

public class Recipe implements Serializable{

	private String name;

	private HashMap<String,Double> ingridients = new HashMap<String, Double>();
	private HashMap<String,String> units = new HashMap<String, String>();
	
	public Recipe(){
		super();
	}

	public Recipe(String name){
		this.name=name;
	}
	
	public Recipe(String name, HashMap<String,Double> ingridients, HashMap<String,String> units) {
		this.name = name;
		this.ingridients = ingridients;
		this.units = units;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public HashMap<String, Double> getIngridients() {
		return ingridients;
	}

	public HashMap<String, String> getUnits() {
		return units;
	}

	public void setUnits(HashMap<String, String> units) {
		this.units = units;
	}

	public void setIngridients(HashMap<String, Double> ingridients) {
		this.ingridients = ingridients;
	}
	
	public void addIngridient(String name, double amount, String unit){
		ingridients.put(name, amount);
		units.put(name, unit);
	}
	
	public void removeIngridient(String name){
		ingridients.remove(name);
		units.remove(name);
	}

}
